/******************************************************************************
 * Copyright (C) 2025 Lee_DJ. All Rights Reserved.
 * 
 * All Rights Reserved.
 * 
 * @file bsp_LED.c
 * 
 * @par dependencies 
 * - bsp_key.h
 * - stdio.h
 * - stdint.h
 * 
 * @author Lee_DJ
 * 
 * @brief Provide the HAL APIs of LED and corresponding opetions.
 * 
 * Processing flow:
 * 
 * call directly.
 * 
 * @version V1.0 2025-10-9
 *
 * @note 1 tab == 4 spaces!
 * 
 *****************************************************************************/

#include "bsp_led.h"

//******************************** Defines **********************************//

//*********************Thread_Func **********************//
osThreadId_t              led_TaskHandle;
const osThreadAttr_t led_Task_attributes = {
  .name = "led_Task",
  .stack_size = 128 * 4,
  .priority = (osPriority_t) osPriorityNormal,
};
//*********************Thread_Func **********************//

//*********************Queue_Handler ********************//
QueueHandle_t led_queue;

//*********************Queue_Handler ********************//


/**
 * @brief Instantiates the bsp_led_handler_t target.
 * 
 * Steps:
 *  1.doing the specific operations
 *  
 * @param[in] void 
 * 
 * @return led_handler_status_t : Status of the function.
 * 
 * */
led_status_t led_on_off(led_operation_t led_operation)
{
	led_status_t ret = LED_OK;
	 
	if( LED_ON 				== led_operation)
	{
        //1. Make the LED ON
        HAL_GPIO_WritePin(KEY1_GPIO_Port, LED1_Pin, GPIO_PIN_RESET); 		
	}
 	if( LED_OFF 			== led_operation)
	{
        //1. Make the LED OFF
        HAL_GPIO_WritePin(KEY1_GPIO_Port, LED1_Pin, GPIO_PIN_SET); 		
	}
	if( LED_ON 				== led_operation)
	{
        //1. Make the LED toggle
		HAL_GPIO_TogglePin(KEY1_GPIO_Port, LED1_Pin); 		
	}
 }

/**
 * @brief key_task_func for thread to run.
 * 
 * Steps:
 *  1.doing the specific operations
 *  
 * @param[in] void 
 * 
 * @return led_handler_status_t : Status of the function.
 * 
 * */
void led_task_func(void *argument)
{

}